package com.bnz.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Id;
import javax.persistence.Transient;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Student {
    @Id
    private Integer sid;
    private String sname;
    private String sex;
    private Integer age;
    private String addr;
    private Integer cid;
    @Transient //不参与序列化
    private String cname;

    public Student(Integer sid, String sname, String sex, Integer age, String addr, Integer cid) {
        this.sid = sid;
        this.sname = sname;
        this.sex = sex;
        this.age = age;
        this.addr = addr;
        this.cid = cid;
    }
}
